Skip to content

feat: MyTask M6-M8 + Sprint 1 M9 — task market UI, social recovery, x402 payment#280

Merged
fanhousanbu merged 6 commits intomasterfrom
fix/pr278-clean-onto-master
Apr 7, 2026
Merged

feat: MyTask M6-M8 + Sprint 1 M9 — task market UI, social recovery, x402 payment#280
fanhousanbu merged 6 commits intomasterfrom
fix/pr278-clean-onto-master

Conversation

@fanhousanbu
Copy link
Copy Markdown
Collaborator

@fanhousanbu fanhousanbu commented Apr 7, 2026

Summary

Clean rebase onto master — supersedes #278 and #279. Excludes SDK work already merged via #237/#250/#251/#272.

4 commits, ~6000 additions:

Commit Content
feat(tasks): add MyTask M6-M8 task market UI TaskContext, task list/create/detail, TaskEscrowV2 ABI, contract config
feat(recovery): add social recovery UI and guardian-sign page /recovery page, guardian-sign update, E2E test docs
feat(tasks): Sprint 1 M9 — ERC-20 balance, EIP-2612 permit, x402 receipts T01 balance display, T02 createTaskWithPermit, T06 receipt scaffolding
feat(tasks): Sprint 1 T05/T06 — x402 payment flow + receipt display lib/x402-client.ts, 402→sign→retry flow, auto linkReceipt, receipt detail UI

Closes

Supersedes #278 and #279 (both can be closed after this merges)

Test plan

M6-M8 Task market:

  • Configure MetaMask with Anvil (chainId 31337, RPC http://127.0.0.1:8545)
  • Account A: /tasks → Post Task → Approve USDC → Create
  • Account B: Claim Task → Submit Work
  • Account A: Approve & Pay Out

Sprint 1 x402:

  • Set NEXT_PUBLIC_X402_API_URL=http://localhost:3401 in .env.local
  • Start API server: cd MyTask/packages/api-server && pnpm start
  • Create task → MetaMask: x402 sign → permit sign → tx → receipt linked
  • Task detail shows receipt ID, payer, timestamp
  • Remove NEXT_PUBLIC_X402_API_URL → task still creates (graceful degradation)

Social recovery:

  • /recovery page: propose + execute social recovery flow

Integrate MyTask task market into YAA frontend under /tasks route.

- Add TaskContext with contract read/write (createTask, acceptTask,
  submitWork, approveWork, finalizeTask, cancelTask)
- Add task list page with All/Open/Mine/Claimed filter tabs and search
- Add create task form with ERC-20 approve + createTask two-step flow
- Add task detail page with role-based action buttons (Community/Taskor)
- Add TaskEscrowV2 ABI and contract config (viem, env-driven chain)
- Add task-types.ts (TaskStatus enum, ParsedTask), date-utils.ts
- Inject TaskProvider in app layout; add Tasks nav (desktop + mobile)
- Upgrade tsconfig target to ES2020 (BigInt literal support)
- Add /recovery page for on-chain social recovery flow (propose + execute)
- Update guardian-sign page for QR-based guardian signature
- Add social recovery E2E test docs and HTML test pages
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

…ipts

T01: 积分余额展示
- TaskContext 新增 taskTokenBalance / loadTaskTokenBalance
- Dashboard 新增 Task Reward Balance 卡片,实时读取 ERC-20 余额

T02: createTaskWithPermit
- TASK_ESCROW_ABI 补充 createTaskWithPermit / ERC20 nonces / name / permit
- 创建任务时优先走 EIP-2612 permit(单 tx 无需 approve)
- permit 失败自动降级为 approve + createTask

T06: linkReceipt 前端
- ABI 补充 linkReceipt / getTaskReceipts
- TaskContext 新增 getTaskReceipts / linkReceipt
- 任务详情页新增 x402 Receipts 区域:显示已绑定收据,参与方可手动 link
T05 — X402Client integration (lib/x402-client.ts):
- postTaskWithX402: POST /tasks → 402 → sign EIP-3009 → retry → receiptId
- fetchReceiptDetails: GET /receipts/:id for richer display
- Graceful degradation when NEXT_PUBLIC_X402_API_URL not set

T06 — Receipt display & auto-link:
- create/page.tsx: x402 sign → createTaskWithPermit → auto linkReceipt (3-step)
- [taskId]/page.tsx: show payer + timestamp per receipt, fetched from API
- task-config.ts: add X402_API_URL, REWARD_TOKEN_NAME/VERSION, isX402Configured()
@fanhousanbu fanhousanbu changed the title feat: MyTask M6-M8 task market UI + social recovery (clean rebase onto master) feat: MyTask M6-M8 + Sprint 1 M9 — task market UI, social recovery, x402 payment Apr 7, 2026
- Run prettier on all 11 frontend files (task pages, contexts, lib)
- Remove unused imports: IsPositive, IsNumberString, EnvConfigService, AnalyzeTransactionDto
- Rename catch (error) → catch (_error) in user-nft and user-token services
  where the error variable was not used (per @typescript-eslint/no-unused-vars)
- Reformat guardian-setup.dto.ts with prettier after import cleanup
- Remove unused `data` destructure from useDashboard() call
- Remove unused DEFAULT_REWARD_TOKEN_SYMBOL and getStoredAuth imports
@fanhousanbu fanhousanbu merged commit 1e59b3a into master Apr 7, 2026
13 checks passed
@fanhousanbu fanhousanbu deleted the fix/pr278-clean-onto-master branch April 7, 2026 07:07
@fanhousanbu fanhousanbu restored the fix/pr278-clean-onto-master branch April 7, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant